import request from '@/utils/request.js'

export default{

  //1、生成订单
  createOrders(courseId){
    return request({
      url: '/eduorder/order/createOrder/' + courseId,
      method: 'post'
    })
  },

  //2、根据订单id查询订单信息
  getOrdersInfo(id){
    return request({
      url: '/eduorder/order/getOrderInfo/' + id,
      method: 'get'
    })
  },

  //3、生成二维码
  createNativie(orderNo){
    return request({
      url: '/eduorder/paylog/createNative/' + orderNo,
      method: 'get'
    })
  },

  //4、查询订单状态
  queryPayStatus(orderNo){
    return request({
      url: '/eduorder/paylog/queryPayStatus/' + orderNo,
      method: 'get'
    })
  },
}
